//
//  UserDidLogoutEventProcessor.swift
//  app_rn_frontend
//
//  Created by 鱼涛 on 2017/12/13.
//  Copyright © 2017年 Facebook. All rights reserved.
//

import Foundation

class UserDidLogoutEventProcessor :EventProcessorProtocol{
  static let instance = UserDidLogoutEventProcessor()
  
  private init(){}
  
  func process(params: Dictionary<String, Any>?) throws{
    
//    ConfigHelper.instance.set(key: ConfigKey.userId, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.userName, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.accountToken, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.syncTime, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.chatIp, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.familySyncTime, value: "")
//    ConfigHelper.instance.set(key: ConfigKey.userKey, value: "")
//    ConfigHelper.instance.set(key: .chatOpen, value: "0")

    AppStatusManager.instance.urlForUser = nil
    AppStatusManager.instance.urlForUserAvatar = nil
    AppStatusManager.instance.urlForUserDB = nil
    AppStatusManager.instance.chatServerIp=""
    AppStatusManager.instance.syncTime=""
    AppStatusManager.instance.userLoginStatus = (false, nil, nil);
    AppStatusManager.instance.avatarPath = nil

    ConnectionManager.instance.drop()
  }
}
